Detect Unintended Memory Access (or DUMA) is a memory debugger. It consists of a library which programmers can link into their code to override the C standard library and C++ memory management functions. DUMA triggers a program crash when the memory error occurs, so a debugger can be used to inspect the code that caused the error.
This library is a fork of Bruce Perens' Electric Fence library, but also runs on Windows operating systems.
DUMA is intended to find several common types of programming bugs:
In above cases, DUMA causes the errant program to abort immediately via a segmentation fault. Normally, these errors would cause heap corruption, which would manifest itself only much later, usually in unrelated ways. Thus, DUMA helps programmers find the precise location of memory programming errors.
DUMA allocates at least two pages (often 8kB) for every allocated buffer. In some modes of operation, it does not deallocate freed buffers. Thus, DUMA vastly increases the memory requirements of programs being debugged. This leads to the recommendation that programmers should never leave DUMA linked against production code.
DUMA is free software licensed under the GNU General Public License.